package com.flnet.foxwash.service.impl;

import java.util.List;

import com.flnet.foxwash.domain.WVendor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flnet.foxwash.mapper.WPayMapper;
import com.flnet.foxwash.domain.WPay;
import com.flnet.foxwash.service.IWPayService;
import com.flnet.common.support.Convert;

/**
 * 支付 服务层实现
 * 
 * @author flnet
 * @date 2019-03-20
 */
@Service
public class WPayServiceImpl implements IWPayService 
{
	@Autowired
	private WPayMapper wPayMapper;

	/**
     * 查询支付信息
     * 
     * @param payId 支付ID
     * @return 支付信息
     */
    @Override
	public WPay selectWPayById(Long payId)
	{
	    return wPayMapper.selectWPayById(payId);
	}
	
	/**
     * 查询支付列表
     * 
     * @param wPay 支付信息
     * @return 支付集合
     */
	@Override
	public List<WPay> selectWPayList(WPay wPay)
	{
	    return wPayMapper.selectWPayList(wPay);
	}
	
    /**
     * 新增支付
     * 
     * @param wPay 支付信息
     * @return 结果
     */
	@Override
	public int insertWPay(WPay wPay)
	{
	    return wPayMapper.insertWPay(wPay);
	}
	
	/**
     * 修改支付
     * 
     * @param wPay 支付信息
     * @return 结果
     */
	@Override
	public int updateWPay(WPay wPay)
	{
	    return wPayMapper.updateWPay(wPay);
	}

	/**
     * 删除支付对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWPayByIds(String ids)
	{
		return wPayMapper.deleteWPayByIds(Convert.toStrArray(ids));
	}

	/**
	 * 更新支付状态
	 *
	 * @param wPay 需要更新状态的支付
	 * @return 结果
	 */
	@Override
	public int changeStatus(WPay wPay) {
		return wPayMapper.updateWPay(wPay);
	}
	
}
